package com.zgkxzx.mvpbase.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.zgkxzx.mvpbase.R;
import com.zgkxzx.mvpbase.presenter.MainPresenter;
import com.zgkxzx.mvpbase.view.IMainView;

import butterknife.BindView;
import butterknife.OnClick;


/**
 * 创建者 zgkxzx
 * 日期   2017-04-01
 * 描述   MinAcitivity 类
 */

public class MainActivity extends BaseActivity<IMainView, MainPresenter> implements IMainView {
    private final static String TAG = MainActivity.class.getSimpleName();

    @BindView(R.id.tv_text)
    TextView tvText;

    @BindView(R.id.btn_get_value)
    Button btnGetValue;



    @Override
    protected int getLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    protected void initVariables() {

    }

    @Override
    protected void initViews(Bundle savedInstanceState) {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected MainPresenter getPresenter() {
        return new MainPresenter();
    }


    @OnClick(R.id.btn_get_value)
    void getSumValue(View view) {
        presenter.getSumResult();
    }

    @Override
    public void display(String msg) {
        tvText.setText(msg);
    }
}
